import { cloneDeep } from 'lodash-es'
import { BwVueComNameEnum } from '../../../render/enums'

import { vSlotOptions } from './src/slot'

import type { BwDesignNodeComDefaultOptionModel } from '../../model'

/** 获取组件默认配置信息 */
export function getVueComDefaultConfig(comCode: BwVueComNameEnum) {
  const data: BwDesignNodeComDefaultOptionModel = {
    attrs: null,
    enableSlotList: null,
  }
  switch (comCode) {
    case BwVueComNameEnum.slot: {
      data.attrs = cloneDeep(vSlotOptions.attrs)
      data.enableSlotList = cloneDeep(vSlotOptions.slotList)
      break
    }
  }
  return data
}
